package com.sphd.restaurantsystem.presenter;


import com.android.volley.VolleyError;
import com.sphd.restaurantsystem.info.DuihuanInfo;
import com.sphd.restaurantsystem.model.IntegralRecordModelImpl;
import com.sphd.restaurantsystem.view.IntegralRecordView;

import java.util.List;

/**
 * Created by Hu on 2016/11/14
 */

public class IntegralRecordPresenterImpl implements IntegralRecordPresenter {
    IntegralRecordModelImpl integralRecordModel;
    IntegralRecordView integralRecordView;

    public IntegralRecordPresenterImpl(IntegralRecordView integralRecordView) {
        this.integralRecordView = integralRecordView;
        integralRecordModel = new IntegralRecordModelImpl();
    }

    @Override
    public void addData(String url) {
        integralRecordModel.sendUrl(url,this);
    }

    @Override
    public void sendError(VolleyError error) {

    }

    @Override
    public void sendRes(List<DuihuanInfo> duihuanInfos, int integral) {
        integralRecordView.recRes(duihuanInfos,integral);
    }
}